package task;

import java.util.Scanner;

public class Task4_6 {
    public static void main(String[] args) {
        Scanner input =new Scanner(System.in);
        int n = input.nextInt();
        int a = 1;
        int b = 1;
        int sum = 0;
        if(n == 1 ||n == 2){
            System.out.println(a);
        }
        for (int i = 3; i <= n; i++) {
            sum = a + b;
            a = b;
            b = sum;
        }
        System.out.println(sum);
    }
}
